//
//  Minus.cpp
//  Lab12-calcul functie
//
//  Created by Cristi Holdunu on 5/22/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#include <iostream>
#include "Minus.h"

using namespace std;
long double Minus::calcul()
{
    if (!fStang || !fDrept)
        exit(1);
    return calcul(fStang->calcul(),fDrept->calcul());
}
long double Minus::calcul(long double aux1, long double aux2)
{
    return aux1-aux2;
}
string Minus::derivare()
{
    {
        string aux1, aux2,aux;
        if (!fStang || !fDrept)
            exit(1);
        aux1=fStang->derivare();
        aux2=fDrept->derivare();
        aux=aux1+aux2;
        return aux;
    }
}
long double Minus::calculDerivata()
{
    if(!fStang || !fDrept)
        exit(1);
    return calcul(fStang->calculDerivata(),fDrept->calculDerivata());
}
string Minus::concatTermeni(string aux1, string aux2)
{
    return aux1+aux2;
}
std::string Minus::convertString()
{
    std::string aux, aux1, aux2;
    aux1=fStang->convertString();
    aux2=fDrept->convertString();
    aux=aux1+aux2;
    return aux;
}